
validPrice = function( id ) {
	id = id || 'price';
	var price = $('#' + id ).val();
	
	var intReg = /^\d{2,5}$/;
	var floatReg = /^[0-9]+\.([0-9]{1,2})$/;
	
	var priceMatch = intReg.test(price) || floatReg.test(price);
	
	return priceMatch;
}



valid= function(id, reg ){
	return reg.test( $('#' + id ).val( ) );
}
validContactUser = function(id){
	id = id || "contactuser";
	var reg = /^[A-Za-z0-9_\u4e00-\u9fa5]{2,11}$/;
	return valid( id, reg );
}
validQQ = function(qq){
	var reg = /^\d{5,13}$/;
	return valid( qq, reg );
}
validPhone = function(id){
	id = id || 'phone';
	var reg = /^(^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})$/;
	return valid( id, reg );
}

validMobile= function(id){
	id = id || "telephone";
	var reg = /^\d{11}$/;
	return valid( id, reg );
}
validEmail = function(id){
	id = id || "email";
	var reg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
	return valid( id, reg );
}
validWebSite = function( id ){
	id = id || "website";
	var reg = /[0-9a-zA-Z]+.[0-9a-zA-Z]+.[0-9a-zA-Z]+/;
	return valid( id, reg );
}
validAddress = function( id ){
	id = id || "address";
	var reg = /^[A-Za-z0-9_\u4e00-\u9fa5]{3,100}$/;
	return valid( id, reg );
}
validAgentName = function( id ){
	id = id || "agentname";
	var reg = /^[A-Za-z0-9_\u4e00-\u9fa5]{3,32}$/;
	return valid( id, reg );
}